package com.server;

import java.nio.channels.SocketChannel;

import org.apache.log4j.Logger;

/**
 * User: wattsc5
 * <p/>
 * Date: 2/26/12
 */
public class ServerDataEvent
{
	private static final Logger logger = Logger.getLogger(ServerDataEvent.class);

	private NioServer server;

	private SocketChannel socket;

	private byte[] data;

	/**
	 * Initializes a new instance of a ServerDataEvent.
	 *
	 * @param server the server that the data was sent to.
	 * @param socket the socket that the data came from.
	 * @param data the data from the socket.
	 */
	public ServerDataEvent(NioServer server, SocketChannel socket, byte[] data)
	{
		this.server = server;
		this.socket = socket;
		this.data = data;
	}

	public NioServer getServer()
	{
		return server;
	}

	public SocketChannel getSocket()
	{
		return socket;
	}

	public byte[] getData()
	{
		return data;
	}
}
